package com.example.practice.controller;

import com.example.practice.model.User;
import com.example.practice.service.UserDb1Service;
import com.example.practice.service.UserDb2Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * TODO
 *
 * @author zgq
 * @date 2020/10/14 18:08
 */
@RestController
public class PracticeController {

    @Autowired
    private UserDb1Service userDb1Service;
    @Autowired
    private UserDb2Service userDb2Service;

    @GetMapping("/getAll")
    public void getAll() {
        List<User> all = userDb1Service.getAll();
        System.out.println(all);
        List<User> all1 = userDb2Service.getAll();
        System.out.println(all1);
    }
}
